<!--
 * @Desc: 
 * @Author: xuelianYi
 * @Date: 2021-09-26 11:40:45
 * @LastEditors: xuelianYi
 * @LastEditTime: 2021-09-26 15:34:40
 * @FilePath: \canvas\02canvas绘制形状\circle.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>圆形</title>
</head>

<body>
    <canvas id="canvas" width="600" height="600"></canvas>

    <script>
        var canvas1 = document.getElementById("canvas")
        var ctx = canvas1.getContext("2d");

        // 是否是逆时针，默认为false(可不写),是顺时针，true为逆时针
        ctx.arc(300, 300, 100, 0, 2 * Math.PI, true);

        ctx.fillStyle = 'bisque'
        ctx.fill()

        ctx.stroke()

    </script>
</body>

</html>